home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / Tools / Mac / BedrockRC < prev    next >
Encoding:
Text File  |  1994-04-21  |  2.7 KB  |  92 lines  |  [TEXT/MPS ]

  1. # The command before:
  2. #
  3. #      bedrc -c∂+∂+ -d _MAC -i {hfiles} -i {bclr} -i {bclh} -i {utilh} ∂
  4. #               -i {cincludes} {cfiles}pane.r > {cfiles}pane.rez
  5. #      rez -o {cfiles}pane.res {cfiles}pane.rez
  6. #      set exit 0
  7. #      delete -i R[0-9]≈.MLS
  8. #      delete -i tmp.????[0-9]«5»
  9. #      delete {cfiles}pane.rez
  10. #      set exit 1
  11. #
  12. # The makefile after:
  13. #
  14. #      BedrockRC -cpp -d _MAC-i {hfiles} -i {bclr} -i {bclh} -i {utilh} ∂
  15. #         -i {cincludes} -o Files.res Files.r 
  16. #
  17. #
  18. #
  19. # BedrockRC takes all the parameters that BedRC takes plus one new one. -o is a 
  20. # mandatory option that tells what the output file should be.
  21. # BedrockRC will stop processing on error as opposed to the old way which would 
  22. # continue after an error. This was a hassle because the temporary files that had 
  23. # the errors would be deleted, making it difficult to diagnose the problem. 
  24. # BedrockRC does not delete those files on error.
  25. # BCL.r needs to be modified to load xxx.r directly rather than the old catenate 
  26. # style we have been using in the makefile because BedrockRC does not support 
  27. # this. This is how we are doing it now in the makefiles. 
  28. #      bedrc -c∂+∂+ -d _MAC -i {hfiles} -i {bclr} -i {bclh} -i {utilh} ∂
  29. #               -i {cincludes} {bclr}bcl.r > {cfiles}bcl.rez
  30. #          catenate {bclr}macbcl.r >> {cfiles}bcl.rez
  31. #         {REZ} -o {cfiles}bcl.res {cfiles}bcl.rez
  32. #          set exit 0
  33. #          delete -i R[0-9]≈.MLS
  34. #          delete -i tmp.????[0-9]«5»
  35. #          delete {cfiles}bcl.rez
  36. #          set exit 1
  37. #
  38. # Add the following code to bcl.r.
  39. #
  40. #      #ifdef BUILD_MAC
  41. #      #pragma native begin
  42. #      include "macbcl.r";
  43. #      #pragma native end
  44. #      #endif // BUILD_MAC
  45. #
  46. ######################################################################
  47. ######################################################################
  48.  
  49. # This gets BedRC to do the work instead of the makefile.
  50.  
  51.  
  52.  
  53. # Find the name of the output file and concatenate the rest of the
  54. #   parameters for BedRC
  55.  
  56.  Set Exit 0
  57.  Set bedRCParameters ""
  58.  Set lastParameterWasOutputOption 0
  59.  for Param in {"Parameters"}
  60.     If "{Param}" =~ /-o/
  61.         set lastParameterWasOutputOption 1
  62.     else if {lastParameterWasOutputOption}
  63.         Set outFile "{Param}"
  64.         set lastParameterWasOutputOption 0
  65.     else
  66.         Set bedRCParameters "{bedRCParameters} {Param}"
  67.         set lastParameterWasOutputOption 0
  68.     End
  69.  End
  70.  Set Exit 1
  71.  
  72.  
  73. BedRC {bedRCParameters} > BedRC.pipe.rez
  74. Set ExitStatus "{Status}"
  75. Exit "{ExitStatus}" If "{ExitStatus}"
  76.  
  77. Rez -o "{outFile}" BedRC.pipe.rez
  78. Set ExitStatus "{Status}"
  79. Exit "{ExitStatus}" If "{ExitStatus}"
  80. SetFile "{outFile}" -t 'rsrc' -c 'RSED'
  81.  
  82. Set Exit 0
  83. Delete -i R[0-9]≈.MLS ∑ Dev:Null
  84. Delete -i tmp.????[0-9]«5» ∑ Dev:Null
  85. Delete BedRC.pipe.rez ∑ Dev:Null
  86. Set Exit 1
  87.  
  88. Exit "{ExitStatus}"
  89.